package org.linlinjava.litemall.db.service;

import org.linlinjava.litemall.db.dao.LitemallTransferCountMapper;
import org.linlinjava.litemall.db.domain.LitemallTransferCount;
import org.linlinjava.litemall.db.domain.LitemallTransferCountExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zhy
 * @create 2018-10-20 19:36
 **/
@Service
public class LitemallTransferCountService {
	@Resource
	private LitemallTransferCountMapper litemallTransferCountMapper;

	public int add(LitemallTransferCount litemallTransferCount){
		return litemallTransferCountMapper.insert(litemallTransferCount);
	}

	public List<LitemallTransferCount> getList(Integer userId){
		LitemallTransferCountExample example = new LitemallTransferCountExample();
		example.or().andUserIdEqualTo(userId);
		return litemallTransferCountMapper.selectByExample(example);
	}
}
